//
//  DraftViewCell.m
//  SoundPill
//
//  Created by 宋旭东 on 15/3/16.
//  Copyright (c) 2015年 宋旭东. All rights reserved.
//

#import "DraftViewCell.h"

@implementation DraftViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createLabel];
        [self createButton];
    }
    return self;
}

- (void)createLabel
{
    self.firstImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
    [self addSubview:_firstImage];
    self.draftLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.frame.size.height - 40, self.frame.size.width, 40)];
    _draftLabel.textColor = [UIColor colorWithWhite:0.794 alpha:1.000];
    _draftLabel.textAlignment = NSTextAlignmentCenter;
    _draftLabel.font = [UIFont systemFontOfSize:16];
    [_firstImage addSubview:_draftLabel];
}

- (void)createButton
{
    self.delButton = [UIButton buttonWithType:UIButtonTypeCustom];
    _delButton.frame = CGRectMake(0, 0, 20, 20);
    _delButton.backgroundColor = [UIColor colorWithWhite:0.000 alpha:0.450];
    [_delButton setImage:[UIImage imageNamed:@"close"] forState:UIControlStateNormal];
    _delButton.hidden = YES;
    [self addSubview:_delButton];
}
@end
